import org.junit.Test;

import java.util.function.BiPredicate;

public class BiPredicateTest {
    @Test
    public void test1() throws Exception {
        BiPredicate<String,String> b1 = new BiPredicate<>() {
            public boolean test(String a, String b) {
                return a.equals(b);
            }
        };
        System.out.println(b1.test("a", "b"));
    }
    
    @Test
    public void test2() throws Exception {
        BiPredicate<String, String> b2 = (a, b) -> a.equals(b);
        System.out.println(b2.test("a", "b"));

        BiPredicate<String, String> b3 = String::equals;
        System.out.println(b3.test("a", "a"));
    }
}
